package jgl.vajra.management.part.mine.viewModel;

import java.util.List;
import java.util.Map;

import jgl.vajra.management.bean.CarAdvertisementPictureBean;
import jgl.vajra.management.bean.CarMemberPictureBean;
import jgl.vajra.management.part.mine.contract.MemberApplyContract;
import jgl.vajra.management.part.mine.model.MemberApplyModel;
import jgl.vajra.management.widget.mvvm.factory.CreateModel;
import jgl.vajra.management.widget.retrofithelper.rxsubscriber.ProgressObserver;

@CreateModel(MemberApplyModel.class)
public class MemberApplyViewModel extends MemberApplyContract.ViewModel{
    @Override
    public void getCarMemberPictureData(Map<String, Object> map) {
        mModel.getCarMemberPictureData(map).subscribe(new ProgressObserver<List<CarMemberPictureBean>>(false,this) {
            @Override
            public void _onNext(List<CarMemberPictureBean> data) {
                mView.returnCarMemberPictureData(data);
            }
        });
    }

    @Override
    public void getCarAdvertisementPictureData(Map<String, Object> map) {
        mModel.getCarAdvertisementPictureData(map).subscribe(new ProgressObserver<CarAdvertisementPictureBean>(false,this) {
            @Override
            public void _onNext(CarAdvertisementPictureBean data) {
                mView.returnCarAdvertisementPictureData(data);
            }
        });
    }
}
